import request from '@/utils/request'

// 获取部门列表
export function getDepartments() {
  return request({
    url: '/company/department'
  })
}
// 获取简单个人信息
export function addDepartments(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
// 修改部门详情
export function getDepartDetail(id) {
  return request({
    url: '/company/department/' + id
  })
}

// 更新部门数据

export function updateDepartments(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}

// 删除数据
export function delDepartment(id) {
  return request({
    url: '/company/department/' + id,
    method: 'DELETE'

  })
}
